Method and system for deferred assignment of attributes in a computer graphics scene

ABSTRACT

An improved system and method is provided to defer the assignment of an attribute of an object in computer graphics. Through this improved method and system, a graphical object predefined in a computer graphics library can be reused with altered attributes. The operator first identifies the attribute expected to be altered and its corresponding attribute value. The attribute expected to be altered by the operator is included in an instance node related to the object along with the initial value.

CROSS-REFERENCE

[0001] This application claims the benefits of the provisionalapplication of U.S. patent application Ser. No. 60/200,100 which wasfiled on Apr. 27, 2000.

BACKGROUND OF THE INVENTION

[0002] The present invention relates generally to data processing forcomputer graphics, and more particularly, to a system and method forprocessing three-dimensional computer-based graphics.

[0003] As it is known in the industry, a computer-based graphicsprocessing system renders three-dimensional objects for display on atwo-dimensional display device. From the perspective of the processingsystem, each object is defined and represented as a virtual graph ofnodes. More specifically, the graph is most likely a directed andacyclic graph. Using this acyclic graph, a complex object can have anextensive virtual “tree” diagram with different nodes embedded therein.Each node usually represents a component of the object and holds anumber of attributes of that component in an internal format. Thesegraphs of different objects are built by a computer program sometimesknown as the “graphics editor,” which allows an operator to selectcomponents from a library of previously defined components. At aminimum, the library contains lines, arcs and surfaces. As componentsare built from these basic elements, they themselves may be saved in thelibrary for further use. Over time, the library may contain a largenumber of components and objects which may be used or combined withother components to create objects of arbitrary complexity. However, thecomplexity of the objects is not obvious to the operator because eachobject is encapsulated so that it may be operated on as a single entity.The encapsulation entails assigning the attributes of the componentvalues which are stored in the object library. Thus when an object isretrieved from the library, the saved attributes are also retrieved.

[0004] In most cases, it is not required that all attributes of theobject be assigned with values. Unassigned attributes are given valuesfrom the “environment” in which they are placed. When an object isplaced in a scene, the graph representing the object is added to thegraph representing the scene making a larger and more complex graph. Asmentioned above, the graph is likely in a tree form, and an unassignedattribute can get its value by “walking” through the graph from theobject node (where the attribute is) to the root of the tree and using apredetermined value found for its use. This process is referred to as a“default accumulation.” It can also be said that the object “inherits”the attribute from a “parent” or “ancestor” node of the graph. In mostcases, it is desirable not to assign all attributes to an object when itis stored. For example, it is often desirable to allow the operator toassign color attributes to the object when it is placed in a scene. Thusthese attributes would not be assigned in the stored object, butinherited when the object is placed in the scene.

[0005] Although the attributes which are unassigned when the object isstored in the library can be changed through inheritance, internal orfixed attributes of an object cannot be re-assigned. If any attributesneed new values, a new object must be defined and must be saved in orderto be re-used. This cumbersome process includes the steps of locatingthe node or the object which contains the value to be changed, changingthe attribute value of the object, saving the changed object, andcreating a copy with the new values in the library.

[0006] With the process of default accumulation, it is unlikely tooverride any fixed attribute within the object itself because the firstvalue encountered in the path from a “leaf” node to the root for a fixedattribute is always the value provided by the object itself.

[0007] What is needed is a method for altering an attribute of anencapsulated object without having to save the altered object as a newobject.

SUMMARY OF THE INVENTION

[0008] An improved system and method is provided to defer the assignmentof an attribute of an object in computer graphics. Through this improvedmethod and system, a graphical object in a computer graphics library canbe reused with altered attributes. A new occurrence of the object withdifferent attributes is viewed by an operator as an independent entitywhile sharing other unaltered attributes with the object defined in thelibrary.

[0009] In one example of the present invention, for reusing a graphicalobject in a computer graphics library with one or more assignableattributes, initial values for the assignable attributes are firstprovided when the object is defined. At least one assignable attributeof the graphical object expected to be altered can be identified when aninstance of the graphical object is used, and the attribute value of thegraphical object for the used instance can then be altered. The usedinstance is stored in the library as an entity containing only theassignable attributes while sharing other attributes as previouslydefined by the object.

[0010] Viewing from the perspective of the library, the object is storedas a node of a computer graphics scene. Further, the assignableattribute and its initial value are stored in a virtual instance noderelated to the node of the object. A predetermined attribute value forthe identified assignable attribute can be found from one or more nodesconnected directly or indirectly with the node of the object to alterthe value of the identified assignable attribute.

BRIEF DESCRIPTION OF THE DRAWINGS

[0011]FIG. 1 illustrates a simplified virtual tree form representingobjects in a scene which is used for constructing computer graphics.

[0012]FIG. 2 illustrates a virtual tree form representing a scene withtwo objects.

[0013]FIG. 3 illustrates a virtual tree form representing a scene withtwo objects with corresponding instance nodes according to oneembodiment of the present invention.

DETAILED DESCRIPTION

[0014] Referring to FIG. 1, an object 10 is shown in a virtual treediagram form including one or more nodes. It is assumed that a computerprogram, e.g., a graphics editor, allows the placement of variousobjects within a graphics scene. These objects may be retrieved from alibrary of predetermined objects, each of which may be furtherrepresented by a virtual graph of nodes. For example, each node 12, 14,or 16 of the object 10 contains various attributes for that component ornode of the object. If an attribute is not declared or assigned in thenode itself, the value of that attribute can be found by taking the pathfrom that node upward to the root of the tree form and using or“inheriting” the first value found for this attribute in the most directparent. As it is known in the industry, various standard rules ofinheritance can apply when two or more parents are equally direct. Forexample, if an attribute in Node 4 (numeral 16) does not have anassigned value, the graphic editor goes on a level higher to Node 3(numeral 14) to seek any value used or provided for this particularattribute. If it is still not found, Node 1 (numeral 10) will besearched for the value. If a value either in Node 3 or Node 1 is inexistence for this attribute, it will be used as Node 4 “inherits” thevalue from the environment it is in.

[0015] Referring to FIG. 2, the graphic editor usually starts theconstruction of a computer graphic “scene” with a single node 20representing the scene. Attributes defined for this top level nodeprovide overall attributes of the entire scene. The operator of thegraphic editor usually have the ability to assign values to anynon-fixed or assignable attributes of that node. Using the graphiceditor, the operator looks at a predetermined library of stored objectsand selects an object 22 such as a chair object to be included in thescene. In this example, it is assumed that the object is a simple chairof four straight, wooden legs, a white cloth seat, a wooden back, and noarms. The texture of the seat is a coarse straight weave, and thetexture of the wooden parts is “maple.” Moreover, the chair object 22 isrepresented by a graph of nodes representing the geometry and attributesof the component parts (arms, legs, seat, etc.) of the chair.

[0016] While selecting the chair as an object, the operator is unawareof the internal structure of the chair. In the above graph, the scenenode 20 does not alter any fixed attribute of the chair node 22 so thatthe chair appears just as it was defined and saved in the library.Similarly, using the graphics editor, the operator can add an additionalchair 24. Suppose the operator wanted to have the chair represented bychair node 22 to have a white seat and the other chair (the chair node24) to have a black seat. Assuming each chair object was defined withthe seat color attribute predefined in the chair object as an assignableattribute, the operator can override any “default” color of the seat byassigning a new attribute value to the chair node 24.

[0017] Referring to FIG. 3, a simplified example is shown illustratinghow the assignments of various attributes of objects in computergraphics can be deferred and altered. Since components of a computergraphics image is represented by virtual nodes, each node is labeled ornamed, and the node label is used by the graphics editor to locate thenode when an assignable attribute of the node is changed. Assuming ascene node 30, which is the root node of the virtual tree form or acylicgraph, represents a graphic scene yet to be constructed, it may havezero or more other nodes representing objects already placed within thescene. When an object is to be added to a scene node 30, two things areadded to the entire graph. First, an “instance” node 32 is added as achild of the root node (the scene node 30). Next an object node 34representing an object will be added as a child node of the instancenode 32. The operator will likely include in the instance node 32 allthe values of assignable attributes which are not specifically definedwithin the object node 34. Hence, the object node 34, under the instancenode 32, can inherit these values because they bear a parent-childrelationship.

[0018] For example, the value of color attribute would not be assignedin the object node but is left for the operator to determine when heplaces the object 34 within the scene. In this way, two instances of thesame object may have different colors. If only a single instance of anobject occurs in the scene, the instance node may not be used, in whichcase an object graph is added under the graph of the scene directly.That is, the object node is connected to the scene node directly withoutgoing through any instance node. If the same object is reused in thescene with some alterations to its assignable attributes, the graphrepresenting a new occurrence of the object is constructed using thepreviously retrieved or pre-existing object graph, a second instancenode, such as Instance 2 (numeral 36), is identified to represent thesecond or subsequent instance of the object.

[0019] In this new instance node 36, all attributes expected to bealtered are included. Specifically, for each assignable attribute whichthe operator wishes to override, the attribute and its new value arefirst identified by the operator. Then, the assignable attributes andtheir values are then added as “deferred” attributes to aparent/ancestor node of the instance node 36 such as node 30. Therefore,defining a value for an attribute in the instance node, rather in theobject node, functions as an improved method to assign the value to anassignable attribute of the object node.

[0020] In the above described structure for re-using predefined objects,the value for each attribute of the added object is determined by thefollowing process whenever a new occurrence of an object takes place.First, the values of the assignable attributes are “accumulated” usingthe default accumulation method, i.e., seeking the value from the firstnode containing a predetermined value for the attribute. Next, theancestor nodes of the object, such as the instance nodes, areinterrogated if they contain any “deferred” attribute and itscorresponding value, the attribute of the object is then changed to thedeferred attribute value given in the instance node. If there are still“deferred” attributes of the object left with no assigned valuesidentified, the parent nodes of the instance node are then furtherinterrogated until either all deferred attributes are assigned withvalues, or until the root of the virtual tree form is reached.

[0021] Referring still to FIG. 3, in addition to the instance node 32,the instance node 36 for the object node represents the second chairobject. The instance nodes 32 and 36 contain values for some of theassignable attributes for these two different chairs, while the basicinformation or definition about the chairs with fixed attributes iscontained in the shared chair object node 34. More specifically, if thechair is going to be used with different seat colors in these twoinstances, the operator can easily control the process. First, the labelof the seat color attribute within the chair object is located. Thegraphics editor is able to return the label of a single attribute of anobject. The obtained seat color attribute label and the new value ofthat attribute, such as “white”, are saved in the instance node 32 or“Instance 1.” Similarly, when the chair occurs in the scene for thesecond time, the seat color attribute label and the new value of thatattribute, such as “black”, are saved in the instance node 36 or“Instance 2” accordingly. Various attributes of Instance 1 and Instance2 (two chairs) are resolved first through the default accumulationmethod from the attributes of the chair object, the attribute values inthe Instance 1 and 2 nodes, and the scene node 30. For example, the seatcolor attribute of the chairs are found to be the deferred attribute inthe Instance 1 and 2 nodes. In the case of Instance 1, the value for thedeferred attribute changes the final attribute value to “white.”Similarly, the attributes for Instance 2 would set the chair seatattribute value to “black.” By doing so, an object can be reused withchanges of some attributes as needed in a scene without creating orstoring a new entity in the library.

[0022] When a change is made to some fixed attributes of the chairobject in the library, for example, maple arms are added to the chair.Changes will be made universally wherever the chair node is used. Nochange is necessary to a particular scene.

[0023] The present invention thus allows a single predefined object tobe used in several places of a computer graphic image withmodifications. The object appears differently due to the differencesbetween the previously determined values of some assignable attributesand the overriding values provided in an instance node of the object. Byeliminating the need to save a copy of an object for each permutation ofany attribute value, the number of saved objects in the library issignificantly reduced.

[0024] Furthermore, by deferring the assignment of attribute values asdescribed above, and sharing run-time instances of graphs representingcertain objects in a scene, the size of the graph representing the sceneis also reduced. In addition, certain changes made to objects stored inthe library will be reflected in every scene using that object and noadditional change is needed to a particular scene.

[0025] The present disclosure provides many different embodiments, orexamples, for implementing different features of the invention. Specificexamples of components, and processes are described to help clarify theinvention. These are, of course, merely examples and are not intended tolimit the invention from that described in the claims.

[0026] While the invention has been particularly shown and describedwith reference to the preferred embodiment thereof, it will beunderstood by those skilled in the art that various changes in form anddetail may be made therein without departing from the spirit and scopeof the invention, as set forth in the following claims.

What is claimed is:
 1. A method for defining one or more reusablegraphical objects with assignable attributes in a computer graphicsscene, the method comprising: defining at least one graphical objectwith at least one assignable attribute in its first instance added tothe graphics scene; and adding a second instance of the graphical objectwith the value for the at least one assignable attribute identifiedbased on the need of the graphics scene, wherein the first and secondinstances of the graphical object share a predetermined set of fixedattributes of the graphical object.
 2. The method of claim 1 furthercomprising providing an initial value to each assignable attribute. 3.The method of claim 1 wherein the step of adding further comprisesdetecting the assignable attribute.
 4. A method for reusing a graphicalobject in a computer graphics library with one or more assignableattributes, the method comprising: providing initial values for theassignable attributes; identifying at least one assignable attribute ofthe graphical object expected to be altered when an instance of thegraphical object is used; and altering the attribute value of thegraphical object for the used instance, wherein the used instance isstored in the library as an entity containing only the assignableattributes while sharing other attributes as defined by the object. 5.The method of claim 4 wherein the object is defined as a node in thelibrary.
 6. The method of claim 4 wherein the step of identifyingfurther comprises including the assignable attribute and its initialvalue in a virtual instance node related to the object; finding apredetermined attribute value for the identified assignable attributefrom one or more nodes connected directly or indirectly with the node ofthe object; and replacing the initial value of the assignable attributewith the found predetermined attribute value.
 7. A system for reusing agraphical object in a computer graphics library with one or moreassignable attributes, the system comprising: means for providinginitial values for the assignable attributes; means for identifying atleast one assignable attribute of the graphical object expected to bealtered when an instance of the graphical object is used; and means foraltering the attribute value of the graphical object for the usedinstance, wherein the used instance is stored in the library as anentity containing only the assignable attributes while sharing otherattributes as defined by the object.
 8. The system of claim 7 whereinthe object is defined as a node in the library.
 9. The system of claim 7wherein the means for identifying further comprises means for: includingthe assignable attribute and its initial value in a virtual instancenode related to the object; finding a predetermined attribute value forthe identified assignable attribute from one or more nodes connecteddirectly or indirectly with the node of the object; and replacing theinitial value of the assignable attribute with the found predeterminedattribute value.